package com.nursebetty.server.common;

import java.util.Collection;

/**
 * @author Group 6 - Nurse Betty
 * 
 *         Provide functionality. Authentication / Permissions / Profile
 * 
 */
public interface CommonFunctionality {

	/**
	 * @param username
	 * @param applicationToken
	 * @param userPermissions
	 */
	public void setUserProfile(String username, String applicationToken, Collection<UserPermissions> userPermissions);

	/**
	 * @param applicationName
	 */
	public void setApplication(String applicationName);

	/**
	 * 
	 * @param user
	 *            User Name
	 * @param password
	 *            User Password
	 * 
	 *            Returns userId/ 0 for failed login
	 * @return
	 */
	public Integer isUser(String username, String password);

	/**
	 * @param username
	 *            User Name
	 * @param applicationToken
	 *            Unique application Code Returns a list of permissions the user
	 *            has (can be configured by each group using a web interface)
	 * @return
	 */
	public UserPermissions getPermissions(String username, String applicationToken);

	/**
	 * @param username
	 *            User Name
	 * @param applicationToken
	 *            Unique application Code Returns groups that the user belongs
	 *            to (guest, admin, etc...)
	 * @return
	 */
	public Collection<GroupTypeEnum> getGroup(String username, String applicationToken);

	/**
	 * @param username
	 * @param applicationToken
	 *            Returns public information for the user. (ScreenName,
	 *            ScreenPicture, Age,Location{lat/long})
	 * @return
	 */
	public UserProfile getProfile(String username, String applicationToken);

}
